package com.soulkun.smarthome.ui.main.personal.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.soulkun.smarthome.logic.dto.FamilyInvitationDTO
import com.soulkun.smarthome.logic.repository.ApiRepository

class AppMainPersonalFamilyJoinViewModel : ViewModel() {

    val familyInvitationLiveData = MutableLiveData<String>("")

    fun joinFamily() = run {
        ApiRepository.joinFamily(FamilyInvitationDTO(familyInvitationLiveData.value ?: ""))
    }

}